/**
 * 
 */
package org.oy.sealogger.parser;

import java.util.Observable;
import java.util.Observer;

/**
 * @author Juho Heikka
 *
 */
public abstract class NMEA0183Sentence extends Observable implements Observer {
	
	protected String sentence = null;
	protected String[] dataFields = null;
	protected final String delim = ",";
	
	public NMEA0183Sentence(String sentence) {
		this.sentence = sentence;
		dataFields = sentence.split(delim);
	}
	
	public NMEA0183Sentence() {
		
	}
	
	public String[] getDataFields() {
		return dataFields;
	}
	
	public void addSentence(String sentence) {
		this.sentence = sentence;
		dataFields = sentence.split(delim);
	}
	
	public String getRawSentence() {
		return sentence;
	}
	
	public abstract String getXMLSentence();
}
